package com.kuaiyin.mapper;

import com.kuaiyin.entity.Departments;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 * 部门信息表（含完整审计字段） Mapper 接口
 * </p>
 *
 * @author ng
 * @since 2025-04-22
 */
public interface DepartmentsMapper extends BaseMapper<Departments> {

    @Update("update departments set status = #{status} where id = #{id}")
    Integer updateStatus(Integer id, Boolean status);

    @Select("select  count(*) from  user where  department_id = #{id}")
    Integer getUser(Integer id);
}

